<html>


<head>
    <title>放置文章标题</title>
</head>

<body>

    <!-- <script>
        var scope = "global";
        function checkscope(){
            var scope ="local";
            return scope;
        }
        var a = checkscope();
        console.log("a",a);
    </script> -->

    <!-- <script>
        scope = "global";
        function checkscope() {
            scope = "local";
            myscope = "locala"
            return [scope,myscope];
        }
        var a = checkscope();
        console.log("a", a);
    </script> -->

    <!-- <script>
        var scope = "global scope";
        function checkscope(){
            var scope = "local scope";
            function nested(){
                var scope = "nested scope";
                return scope;
            }
            return nested();
        }

        var result = checkscope();
        console.log("result",result);
    </script> -->

    <!-- 函数作用域和声明提前 -->

    <!-- <script>
        function test(o){
            var i= 0;
            if(typeof o == "object") {
                var j = 0;
                for (var k =0; k <10; k++){
                   console.log("k",k); 
                }
            }
            console.log("j",j);
            console.log("k",k);
        }
        test({a:1});
    </script> -->


    <!-- 面试题 -->
    <!-- <script>
        var a = 12;
        function fn(){
            console.log(a);
            a = 45;
            console.log(a)
        }
        fn();
    </script> -->

    <!-- 面试题 -->
    <script>
        var scope = 1;
        function fn() {
            console.log(scope);
            var scope = 2
            console.log(scope)
        }
        fn();
    </script>

    这里就是正文内容
    <!-- <div>
            <h1>Debug Log</h1>
    </div> -->
</body>

</html>